import re


def input_multilines(hint: str) -> str:
    print(hint)
    lines = []
    while True:
        line = input()
        if line == '@@@@@':
            break
        else:
            lines.append(line)
    text = '\n'.join(lines)
    return text


def insert_line_after(original_text: str, target_line: str, new_line: str) -> str:
    # 使用正则表达式在指定行之后插入新行
    modified_text = re.sub(rf'({re.escape(target_line)})\n', rf'\1\n{new_line}\n', original_text)
    return modified_text
